<!DOCTYPE html>
<html lang="en">

	<head>
		<meta charset="UTF-8">
		<meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,minimum-scale=1,user-scalable=no">
		<title>运营者</title>
		<meta name="keywords" content="e+便利">
		<meta name="description" content="">
		<meta name="robots" content="index,follow">
		<!-- <meta content="telephone=no,email=no" name="format-detection" /> -->
		<link rel="stylesheet" href="css/common.css">
		<link rel="stylesheet" href="css/skin.css">
		<link rel="stylesheet" href="css/ani.css">
		<script src="js/jquery-2.1.4.min.js"></script>
		<script src="js/laytpl.js"></script>
		<!-- 百度地图 -->
		<script type="text/javascript" src="http://api.map.baidu.com/api?v=2.0&ak=YuYQ6LFlFeQYCGmWuHEo6UU19KqQWeYp"></script>
	</head>
	
	<body>
		
		<section class="container">
			<div class="top">
				<img class="bg_top" src="img/bg_top.png" alt="">
				<div class="topWrap">
					<h3 class="title">运营宗旨</h3>
					<div class="tags flex-h">
						<span class="line flex1"></span>
						<p class="text">专业 标准 透明 便捷</p>
						<span class="line flex1"></span>
					</div>
					<img class="title_img" src="img/title_img.png" alt="">
					<p class="bottom_text">REASONABLE FINANCING</p>
				</div>
			</div>
			<div class="content">
				
			</div>
			<div class="footer">
				<a href="protocol.html">消费返利软件许可及服务协议</a>
			</div>
		</section>
		<script type="text/html" id="contentwrapper">
			<div class="contentWrap">
					<ul>
						<li class="item bdr-bottom flex-h">
							<span class="label">运营者： </span>
							<div class="text flex1">
								<p>{{d.shopname}}</p>
							</div>
						</li>
						<li class="item bdr-bottom flex-h">
							<span class="label">联系人： </span>
							<div class="text flex1">
								<p>{{d.shopuser}}</p>
							</div>
						</li>
						<li class="item bdr-bottom flex-h">
							<span class="label">电话： </span>
							<div class="text flex1">
								<p>{{d.phone}}</p>
							</div>
						</li>
						<li class="item flex-h">
							<span class="label">地址： </span>
							<div class="text flex1">
								<p class="line-01">{{d.address}}</p>
							</div>
						</li>
						<li class="item map">
							<div id="allmap"></div>
						</li>
					</ul>
				</div>
		</script>
		<script type="text/javascript">
			function request(method,url,fun,data){
		        // console.log(url);
		        data=data||{};
		        url+="?v="+new Date().getTime();
		        $.ajax({
		            type:method,
		            url:url,
		            data:data||{date:new Date().getTime()},
		            success: function(msg){
		                if(fun){
		                    fun(msg);
		                    }           
		           },
		            error: function () {
		                            isCommit = true;
		                            layer.open({content:'error',skin:'msg',time:2});
		                        }
		        })
		        
		    }

		    var arr=location.href.split('?');

    		var id=arr?arr[1].split('=')[1]:0;

    		

    		request('get','/api/shop/operator',function(data){
    			console.log(data)
    			if(data.code==200){
    				var shopinfo=data.data.cnt;
    				$('.content').html('');
    				var tpl=contentwrapper.innerHTML;
    				laytpl(tpl).render(shopinfo,function(html){
    					$('.content').append(html);
    				})
    				var map = new BMap.Map("allmap");
    				map.centerAndZoom(new BMap.Point(shopinfo.longitude, shopinfo.latitude),18);
			map.enableScrollWheelZoom(true);
			var new_point = new BMap.Point(shopinfo.longitude, shopinfo.latitude)
			var marker = new BMap.Marker(new_point);  // 创建标注
			map.addOverlay(marker);              // 将标注添加到地图中
			map.panTo(new_point);  
    			}
    		},{id:id})
		</script>
	</body>

</html>
